<div id='titleHead'>
	<h1><%= @title %></h1>
</div>
<div class='documentation'>		
Welcome to our petrinet engine. This is a web interface to deploy petri net engines.
Below you get the opportunity to deploy a new petrinet by posting pnml defining the net.
For detailed instructions about the grammer of such a pnml, visit our <a href="http://code.google.com/p/pnengine/">Google Code Project Site</a>.
On the bottom you can see existing petrinets. Get detailed information by using the links.
</div>
<div class='container'>	
	<h3>Create new Petri net</h3>
	<form id="new_petrinet_form" action="<%= url(:petrinets) %>" method="post">
		<textarea name="pnml_content" cols="100" rows="7"></textarea>
		<p><button type="button" onclick="createPetrinet()">
			Post PNML to create new Petri net
			<%= image_tag('ajax-loader.gif', :style => "display:none", :id => "new_petrinet_loading")%>
			<%= image_tag('famfamfam/exclamation.png', :style => "display:none", :id => "new_petrinet_error")%>
   		</button></p>
		<div id="errors"></div>
	</form>
</div>
<div class='container'>	
	<h3>Open existing Petri nets</h3>
	There are currently <%= @petrinets.size %> petri nets available.		
	<% @petrinets.each do |petrinet| %>
		<p><a href='<%= url(:petrinet, petrinet) %>'><%= petrinet.name || "Unnamed Petrinet" %></a><a href="javascript:deletePetrinet('<%= url(:petrinet, petrinet) %>')"><%= image_tag('delete.png', :border => "0", :alt => "Delete")%></a><br/></p>
	<% end %>
</div>